Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cdk:popper): upgrade popperjs to floating-ui #1191

Merged

Conversation

sallerli1
Copy link
Contributor

BREAKING CHANGE: forceUpdate is now removed

BREAKING CHANGE: modifiers is now changed to middlewares

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines
  • Tests for the changes have been added/updated or not needed
  • Docs and demo have been added/updated or not needed

What is the current behavior?

What is the new behavior?

迁移popperjs到floating-ui/dom
修改overlay的箭头样式

Other information

floating-ui没有生命周期的说法,更新同一都是异步,因此移除forceUpdate
floating-ui的middleware与原先的modifier无法兼容,将modifier改为middleware

@idux-bot
Copy link

idux-bot bot commented Oct 11, 2022

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Oct 11, 2022

Codecov Report

Merging #1191 (2f2ca12) into next (e207465) will decrease coverage by 3.73%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             next    #1191      +/-   ##
==========================================
- Coverage   96.95%   93.21%   -3.74%     
==========================================
  Files         318      317       -1     
  Lines       30137    29932     -205     
  Branches     2785     3452     +667     
==========================================
- Hits        29218    27901    -1317     
- Misses        919     2031    +1112     
Impacted Files Coverage Δ
...ckages/components/_private/overlay/src/Overlay.tsx 97.26% <ø> (-2.74%) ⬇️
packages/components/_private/overlay/src/types.ts 100.00% <ø> (ø)
packages/cdk/popper/src/convertOptions.ts 100.00% <100.00%> (ø)
packages/cdk/popper/src/types.ts 100.00% <100.00%> (ø)
packages/cdk/popper/src/usePopper.ts 100.00% <100.00%> (+3.97%) ⬆️
packages/pro/config/src/defaultConfig.ts 100.00% <100.00%> (ø)
packages/pro/config/src/types.ts 100.00% <100.00%> (ø)
packages/pro/search/src/ProSearch.tsx 17.41% <0.00%> (-82.59%) ⬇️
packages/pro/textarea/src/IndexColumn.tsx 20.63% <0.00%> (-79.37%) ⬇️
packages/components/watermark/src/Watermark.tsx 28.98% <0.00%> (-71.02%) ⬇️
... and 65 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

packages/cdk/package.json Show resolved Hide resolved
@@ -37,7 +37,6 @@ export type PopperTrigger = 'click' | 'hover' | 'focus' | 'contextmenu' | 'manua
| `show` | 显示浮层 | `(delay?: number): void` | - | - | `delay` 是延迟显示的时间 |
| `hide` | 隐藏浮层 | `(delay?: number): void` | - | - | `delay` 是延迟隐藏的时间 |
| `update` | 更新浮层 | `(options: Partial<PopperOptions>): void` | - | - | - |
| `forceUpdate` | 强制更新浮层 | `(): void` | - | - | - |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

全局搜一下这个 API , 应该有不少组件有用。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
搜到的只有这些

packages/cdk/popper/src/composables/useInstance.ts Outdated Show resolved Hide resolved
packages/cdk/popper/src/types.ts Outdated Show resolved Hide resolved
@sallerli1 sallerli1 force-pushed the replace-popper-with-floating-ui-saller branch from 2f657ca to 0a93d6e Compare October 11, 2022 08:40
BREAKING CHANGE: forceUpdate is now removed

BREAKING CHANGE: modifiers is now changed to middlewares

BREAKING CHANGE: onFirstUpdate is now removed
@sallerli1 sallerli1 force-pushed the replace-popper-with-floating-ui-saller branch from 0a93d6e to 2f2ca12 Compare October 11, 2022 11:57
@danranVm danranVm merged commit 7eb77d6 into IDuxFE:next Oct 11, 2022
danranVm pushed a commit that referenced this pull request Oct 21, 2022
BREAKING CHANGE: modifiers is now changed to middlewares
BREAKING CHANGE: forceUpdate is now removed
BREAKING CHANGE: onFirstUpdate is now removed
@sallerli1 sallerli1 deleted the replace-popper-with-floating-ui-saller branch February 20, 2023 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants